//
// Created by Lemon on 2024/8/30.
//

#include "../base/base_tracker.h"
#include "../utils/file_save_util.h"

#ifndef TRACK_
#define TRACK_

typedef void (*ReportCallback)(const std::string&);

//// this file is build for ios arm64... not for android...

class Tracker : BaseTracker {
private:
    struct sigaction actionNew;
    int isRegister = 0;
public:
    void track() override;

    void registerSignalListener() override;

    void unregisterSignalListener() override;

    void setBaseIsolateInstructions(uint64_t isolateInstructions, uint64_t vmInstructions) override;
    void setStackCallback(void (*stackCallback)(const std::string&)) override;

private :
    static void trackerActionWithSignum(int signum, siginfo_t *info, void *invokeContext);
};

#endif

